package xiaochangsama.the_age_of_immortals.procedures;

import xiaochangsama.the_age_of_immortals.TheAgeOfImmortalsModVariables;
import xiaochangsama.the_age_of_immortals.TheAgeOfImmortalsMod;

import net.minecraft.entity.Entity;

import java.util.Map;

public class XiuLianZhuangTaiProcedure {
	public static void executeProcedure(Map<String, Object> dependencies) {
		if (dependencies.get("entity") == null) {
			if (!dependencies.containsKey("entity"))
				TheAgeOfImmortalsMod.LOGGER.warn("Failed to load dependency entity for procedure XiuLianZhuangTai!");
			return;
		}
		Entity entity = (Entity) dependencies.get("entity");
		if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 0)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u5C1A\u672A\u5F00\u59CB\u4FEE\u70BC");
		} else if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 1)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u6B63\u5728\u4FEE\u70BC");
		} else if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 2)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u6B63\u5728\u6062\u590D\u7075\u529B");
		} else if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 3)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u6B63\u5728\u517B\u4F24");
		} else if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 4)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u6B63\u5728\u6062\u590D\u7CBE\u795E\u529B");
		} else if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 5)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u6B63\u5728\u5DE9\u56FA\u6839\u57FA");
		} else if ((((entity.getCapability(TheAgeOfImmortalsModVariables.PLAYER_VARIABLES_CAPABILITY, null)
				.orElse(new TheAgeOfImmortalsModVariables.PlayerVariables())).xiuLianZhuangTai) == 6)) {
			entity.getPersistentData().putString("xiuLianZhuangTai", "\u4F60\u6B63\u5728\u51A5\u60F3\u5FC3\u6CD5");
		}
	}
}
